#include <config.h>

#include <string.h>
#include <stdlib.h>

#include <libgnome/libgnome.h>
#include <libgnomeui/libgnomeui.h>

#include "libssui.h"

static gboolean logout = FALSE;
static gboolean shutdown = FALSE;
static gboolean downout = FALSE;
static gboolean fusa = FALSE;


static GOptionEntry entries[] = {
{"logout", 0, 0, G_OPTION_ARG_NONE, &logout, "Show logout ui", NULL },
{"shutdown", 0, 0, G_OPTION_ARG_NONE, &shutdown, "Show shutdown ui", NULL },
{"downout", 0, 0, G_OPTION_ARG_NONE, &downout, "Show old shutdown ui", NULL },
{"switch", 0, 0, G_OPTION_ARG_NONE, &fusa, "Show fusa ui", NULL },
{NULL } };


int main(int argc, char **argv)
{
	GError *error = NULL;
	GOptionContext *context;

	context = g_option_context_new ("- command line app for libssui");
	g_option_context_add_main_entries (context, entries, NULL);
	g_option_context_add_group (context, gtk_get_option_group (TRUE));
	g_option_context_parse (context, &argc, &argv, &error);

	gnome_init(PACKAGE, VERSION, argc, argv);

	if(logout)
		ssui_logout_ui();
	else if(shutdown)
		ssui_shutdown_ui();
	else if(downout)
		ssui_downout_ui();
	else if(fusa)
		ssui_show_fusa_ui();
	else
		return 1;

	return 0;
}
